{extend name="base"/}
{block name="resources"}
<style>
    .layui-tab-content{padding-top: 0;}
</style>
{/block}
{block name='second_menu'}
{notempty name="$menu[2]"}
<ul class="layui-nav nc-nav">
	{foreach name="$menu[2]" item="second_menu"}
	<li class="layui-nav-item {$second_menu['selected']}">
		<a href="{$second_menu['url']}" {$second_menu['target']}>{$second_menu['title']}</a>
	</li>
	{/foreach}
</ul>
{/notempty}
{/block}
{block name='crumbs'}{/block}
{block name="main"}
<div class="layui-tab">
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
            <div class="nc-function-search">
                <button class="layui-btn" onclick="openModel();">添加分类</button>
            </div>
			<table class="notice_category_list" id="notice_category_list" lay-filter="notice_category_list"></table>
		</div>
	</div>
</div>

<script type="text/html" id="operation">
	<a href="javascript:;" class="default primary" lay-filter="edit" lay-event="edit">编辑</a>
	<a href="javascript:;" class="default primary" lay-filter="delete" lay-event="delete">删除</a>
</script>

<script type="text/html" id="notice_category_html">
	<div class="layui-form" lay-filter="notice_category">
		<div class="layui-form-item">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-inline nc-len-short">
				<input type="text"  name="title" class="layui-input" value="{{ d.title || ''}}" lay-verify="required">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">排序</label>
			<div class="layui-input-inline nc-len-tiny">
				<input type="number" min="0" max="255" lay-verify="number|required" value="0" name="sort" class="layui-input" value="{{ d.sort || 0 }}" >
			</div>
		</div>
		<div class="nc-form-row">
			<button class="layui-btn" lay-submit="" lay-filter="noticeCategorySubmit">保存</button>
			<button class="layui-btn layui-btn-primary" onclick="back()">返回</button>
		</div>
		<input type="hidden" name="notice_category_id"  value="{{ d.notice_category_id }}">
	</div>
</script>
{/block}

{block name="script"}
<script src="ADMIN_JS/notice_category_list.js"></script>
{/block}